package yunsuan;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;

/**
 * 创建时间：2018年02月11日11:24 <br>
 * 作者：fuchaoyang <br>
 * 描述：
 */

public class Yunsuan extends Activity {
  // 如果只有一组并列就利用单个标记位，如果有关联属性
  int YEAR = 0x001;
  int MONTH = 0x002;
  int DAY = 0x004;
  int HOUR = 0x008;
  int MINUTE = 0x010;
  int type = YEAR | MONTH | DAY;

  @Override protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    boolean has = has(YEAR);
  }

  private boolean has(int type) {
    return (this.type & type) == type;
  }
}
